package classes;

import java.util.Comparator;
import java.util.Date;

public class Event {
	private String _nom;
	private String _description;
	private String _time;
	
	
	public Event(String nom, String description, String time){
		_nom = nom;
		_description = description;
		_time = time;
	}
	
	public String getNom(){
		return _nom;
	}
	
	public String getDescription(){
		return _description;
	}
	
	public String getTime(){
		return _time;
	}
	
	public static Comparator<Event> COMPARE_BY_NAME = new Comparator<Event>() {
        public int compare(Event one, Event other) {
            return one.getNom().compareTo(other.getNom());
        }
    };
    
    public static Comparator<Event> COMPARE_BY_DESCRIPTION = new Comparator<Event>() {
        public int compare(Event one, Event other) {
            return one.getDescription().compareTo(other.getDescription());
        }
    }; 
    
    public static Comparator<Event> COMPARE_BY_DATE = new Comparator<Event>() {
        public int compare(Event one, Event other) {
            return one.getTime().compareTo(other.getTime());
        }
    }; 
}
